{% extends "other/base.html" %}

{% load comments_tags %}
{% load blog_extras %}
{% load myfilters_and_tags %}
{% block csslink %}
{% endblock %}
{% block title %} 菜根谭 列表 {% endblock %}

{% block css %}
    <style type="text/css">

    </style>
{% endblock %}

{% block content %}

{#    <div class="arcicle-sort">#}
{#        <div>#}
{#        <span>#}
{#            <a href="/category/tech/newest/">最新</a>#}
{#        </span>#}
{#            <span>#}
{#            <a href="/category/tech/hottest/">热门</a>#}
{#        </span>#}
{#            <span class="pull-right">#}
{#            <a href="/all/rss/">RSS订阅</a>#}
{#        </span>#}
{#        </div>#}
{#    </div>#}

    <div class="arcicle-sort" style="text-align: center;font-size: 23px;">
        <span>此生光明，亦复何言.</span>
    </div>

    {% for article in articleList %}
        <div class="arcicle-list">
            <header>
                <a class="label label-info" href="/category/{{ article.category.bigcategory.slug }}/{{ article.category.name }}/">
                    {{ article.category.name }}
                </a>
                <h4>
                    <a href="{% url 'article:detail' article.pk %}" target="_blank" title="{{ article.title }}">
                        {{ article.title }}
                    </a>
                </h4>
            </header>

            <div class="focus">
                <a href="{% url 'article:detail' article.pk %}" target="_blank">
                    <img class="thumb img-rounded" src="{{ article.img_link }}">
                </a>
            </div>

            <span class="note">
                {{ article.excerpt }}
            </span>

            <p class="auth-span">
        <span class=" muted">
            <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
            <a href="#">{{ article.author }}</a>
        </span>
                <span class=" muted">
            <span class=" glyphicon glyphicon-time" aria-hidden="true"></span>
            <span>{{ article.created_time | date:"Y-m-j" }}</span>
        </span>
                <span class=" muted">
            <span class=" glyphicon glyphicon-eye-open" aria-hidden="true"></span>
            <span>{{ article.counter }}&#32;阅读</span>
        </span>
                <span class=" muted">
            <span class=" glyphicon glyphicon-comment" aria-hidden="true"></span>
            <span>

                {% get_comment_count article.id as commentscount %}{{ commentscount }}&#32;评论
            </span>
        </span>
                <!--
        <span class=" muted">
            <span class="like glyphicon glyphicon-thumbs-up" aria-hidden="true"></span>
            <span>{{article.loves}}&#32;赞</span>
        </span>
        -->
            </p>
        </div>
    {% endfor %}

    <!--分页-->
{#    {% if is_paginated %}#}
{#        <div class="PageList">#}
{#            <nav aria-label="Page navigation">#}
{#                <ul class="pagination pagination-sm">#}
{##}
{#                    <li class="{% if not page_obj.has_previous %} disabled {% endif %}">#}
{#                        <a href="{% if page_obj.has_previous %} ?page={{ page_obj.previous_page_number }} {% endif %}"#}
{#                           aria-label="Previous">#}
{#                            <span aria-hidden="true">&laquo;</span>#}
{#                        </a>#}
{#                    </li>#}
{##}
{#                    {% if first %}#}
{#                        <li>#}
{#                            <a href="?page=1">1</a>#}
{#                        </li>#}
{#                    {% endif %}#}
{#                    {% if left %}#}
{#                        {% if left_has_more %}#}
{#                            <li>#}
{#                                <span>...</span>#}
{#                            </li>#}
{#                        {% endif %}#}
{#                        {% for i in left %}#}
{#                            <li>#}
{#                                <a href="?page={{ i }}">{{ i }}</a>#}
{#                            </li>#}
{#                        {% endfor %}#}
{#                    {% endif %}#}
{#                    <li class="active"><a href="?page={{ page_obj.number }}">{{ page_obj.number }}</a></li>#}
{#                    {% if right %}#}
{#                        {% for i in right %}#}
{#                            <li>#}
{#                                <a href="?page={{ i }}">{{ i }}</a>#}
{#                            </li>#}
{#                        {% endfor %}#}
{#                        {% if right_has_more %}#}
{#                            <li>#}
{#                                <span>...</span>#}
{#                            </li>#}
{#                        {% endif %}#}
{#                    {% endif %}#}
{#                    {% if last %}#}
{#                        <li>#}
{#                            <a href="?page={{ paginator.num_pages }}">{{ paginator.num_pages }}</a>#}
{#                        </li>#}
{#                    {% endif %}#}
{#                    <li class="{% if not page_obj.has_next %} disabled {% endif %}">#}
{#                        <a href="{% if page_obj.has_next %} ?page={{ page_obj.next_page_number }} {% endif %}"#}
{#                           aria-label="Next">#}
{#                            <span aria-hidden="true">&raquo;</span>#}
{#                        </a>#}
{#                    </li>#}
{#                </ul>#}
{#            </nav>#}
{#        </div>#}
{#    {% endif %}#}
{% endblock %}

